home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / staticshock.swf / scripts / frame_23 / PlaceObject2_977_126 / CLIPACTIONRECORD onClipEvent(load).as
Encoding:
Text File  |  2005-11-09  |  1.2 KB  |  50 lines

  1. onClipEvent(load){
  2.    function initInGameMusic()
  3.    {
  4.       if(inGameFlag == false)
  5.       {
  6.          inGameFlag = true;
  7.          inGameMod.start(0,9999);
  8.          inGameMod.setVolume(0);
  9.          this.onEnterFrame = function()
  10.          {
  11.             if(inGameMod.position == 0 or inGameMod.position == inGameMod.duration)
  12.             {
  13.                inGameMod.start(0,9999);
  14.             }
  15.             var _loc1_ = inGameMod.getVolume();
  16.             if(_loc1_ < _parent.masterVolume)
  17.             {
  18.                _loc1_ += 2;
  19.                inGameMod.setVolume(_loc1_);
  20.             }
  21.             else
  22.             {
  23.                inGameMod.setVolume(100);
  24.                delete this.onEnterFrame;
  25.             }
  26.          };
  27.       }
  28.    }
  29.    function killInGameMusic()
  30.    {
  31.       inGameMod.stop();
  32.       inGameFlag = false;
  33.    }
  34.    var titleMod = new Sound(this);
  35.    titleMod.attachSound("titleMod");
  36.    var inGameMod = new Sound(this);
  37.    inGameMod.attachSound("inGameMusic");
  38.    var inGameFlag = false;
  39.    charRollOver = function()
  40.    {
  41.       this.cursor._visible = true;
  42.       this.cursor.gotoAndPlay(1);
  43.    };
  44.    charRollOut = function()
  45.    {
  46.       this.cursor._visible = false;
  47.       this.cursor.gotoAndStop(1);
  48.    };
  49. }
  50.